
import request from '@/utils/request'

// 查询电子围栏列表
export function listElectricFence(query) {
  return request({
    url: '/comlbs/electricFence/listAll',
    method: 'get',
    params: query
  })
}
// 查询电子围栏列表(不分页)
export function listElectricFenceAll(query) {
  return request({
    url: '/comlbs/electricFence/list',
    method: 'get',
    params: query
  })
}

// 查询电子围栏详细
export function getElectricFence(id) {
  return request({
    url: '/comlbs/electricFence/' + id,
    method: 'get'
  })
}

// 新增电子围栏
export function addElectricFence(data) {
  return request({
    url: '/comlbs/electricFence',
    method: 'post',
    data: data
  })
}

// 修改电子围栏
export function updateElectricFence(data) {
  return request({
    url: '/comlbs/electricFence',
    method: 'put',
    data: data
  })
}

// 删除电子围栏
export function delElectricFence(id) {
  return request({
    url: '/comlbs/electricFence/' + id,
    method: 'delete'
  })
}
// 围栏树
export function fenceTreeData(data) {
  return request({
    url: '/system/dept/polygonTree',
    method: 'POST',
    params: data
  })
}
// 新增电子围栏
export function saveElectricFence(data) {
  return request({
    url: '/comlbs/electricFence',
    method: 'POST',
    data: data
  })
}
